package com.ayf.payment.game.api.controller.platform;

import com.ayf.payment.game.api.dto.platform.NetRateViewDTO;
import com.ayf.payment.game.api.entity.platform.NetQq;
import com.ayf.payment.game.api.service.platform.NetQqService;
import com.ayf.payment.game.api.service.platform.NetRateViewService;
import com.ayf.payment.game.api.type.CommonConstants;
import com.ayf.payment.game.api.utils.CommonResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;


@RequestMapping("/n/net")
@RestController
public class NetQqController {

    @Resource
    private NetQqService netQqService;
    @Resource
    private NetRateViewService netRateViewService;

    @GetMapping("/listNetQq")
    public CommonResult<List<NetQq>> listNetQq() {
        return new CommonResult<>(CommonConstants.RETURN_SUCCESS, "成功", netQqService.list());
    }

    @GetMapping("/listNetRateView")
    public CommonResult<List<NetRateViewDTO>> listNetRateView() {
        return new CommonResult<>(CommonConstants.RETURN_SUCCESS, "成功", netRateViewService.list());
    }

}
